package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 订单明细
 */
@Mapper
public interface OrderDetailMapper {
    /**
     * 批量插入订单明细
     * @param orderDetailList
     */
    void insertBatch(List<OrderDetail> orderDetailList);

/*    *//**
     * 根据id查询你菜品明细
     * @param
     * @return
     *//*
    *//*@Select("select * from order_detail where id=#{id}")
    List<OrderDetail> getByOrderId(Long orderId);*/


    /**
     * 根据订单id获取订单详细信息
     * @param id
     * @return
     */
    @Select("select * from order_detail where order_id=#{id}")
    List<OrderDetail> getByOrderId2(Long id);
}
